Skip to content

Conversation

@Feefkroete
Copy link

Fixes #7

Silencers on guns didn't work because of the boolean "silenced" being used as wrong parameter in method.
Now they do.

@Feefkroete Feefkroete added the bug Something isn't working label Apr 5, 2023
@Feefkroete Feefkroete requested a review from Jomosoto April 5, 2023 17:16
Copy link
Member

@Jomosoto Jomosoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FMLClientHandler.instance().getClient().getSoundHandler().playSound(
new PositionedSoundRecord(event,
SoundCategory.PLAYERS,
silenced ? 2F : 4F,
(distort ? 1.0F / (rand.nextFloat() * 0.4F + 0.8F) : 1.0F) * (silenced ? 2F : 1F),
posX, posY, posZ));

I would decrease the volume a lot more here. I found that 0.5F sounds good. With the current 2F you hear almost no difference.

 FMLClientHandler.instance().getClient().getSoundHandler().playSound( 
 		new PositionedSoundRecord(event, 
 				SoundCategory.PLAYERS, 
-				silenced ? 2F : 4F,
+				silenced ? 0.5F : 4F,
 				(distort ? 1.0F / (rand.nextFloat() * 0.4F + 0.8F) : 1.0F) * (silenced ? 2F : 1F), 
 				posX, posY, posZ)); 

@Feefkroete
Copy link
Author

I changed as suggested. Sounds much better indeed.

@Jomosoto
Copy link
Member

Jomosoto commented Apr 9, 2023

Sounds good 👍
Before merging I just want to test how it sounds in multiplayer, after we reduced the volume this much.

@Jomosoto Jomosoto self-requested a review April 9, 2023 14:03
@Jomosoto
Copy link
Member

I tested it in multiplayer. The volume is good, when you stand next to the person, but it's dropping really quickly with the distance and at about 15 blocks it's completely silent. Could you please look if it's possible to keep the volume, but increase the range

Copy link
Member

@Jomosoto Jomosoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Silencers don't silence

3 participants